import { Controller, Get, HttpException, HttpStatus } from '@nestjs/common';
import { WeatherService } from './weather.service';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
import { ModuleSwaggerTags } from '~/constants/modules.constant';
import { Public } from '../auth/decorators/public.decorator';

@ApiTags(ModuleSwaggerTags.WEATHER)
@Controller('cms/weather')
export class WeatherController {
  constructor(private readonly weatherService: WeatherService) {}

	@Public()
  @Get('sync')
  @ApiOperation({ summary: '同步当天信息文件' })
  async readFile() {
    return this.weatherService.readFile();
  }
}
